<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String path=request.getContextPath();
	String basePath=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -->
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base href="<%=basePath%>">
<title>用户登录</title>
<link type="text/css" href="css/style.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
<script src="js/Reg.js" type="text/javascript" charset="utf-8"></script>
</head>
<script type="text/javascript">
	function test()
	{
		var name=document.getElementById("txtUserCode").value;
		var pass=document.getElementById("txtPassword").value;
		var vali=document.getElementById("txbValidate").value;
		var hid=document.getElementById("hid").value;
		if(name.trim()==""||pass.trim()=="")
		{
			alert("用户名或密码输入不能为空");
			return false;
		}
		else if(vali.trim()=="")
		{
			alert("验证码输入不能为空");
			return false;
		}
		else if(vali.trim()!=hid.toLowerCase()&&vali.trim()!=hid)
		{
			alert("请输入正确的验证码");
			return false;
		}
	}
</script>

<body onload="load();createCode();">
	<%@ include file="include/head.jsp" %>
	
	
	<div id="UpdatePanel1">
         <div id="ymain">
         	<!--留白部分-->
            <div class="h-10"></div>
            <div class="h-10"></div>
            <!--中部右侧图片-->
            <div class="w-600">
                   <img src="image/wx-img.jpg">
            </div>
            <!--中部左侧登录块-->
          
            <div class="w-login-form">
                 <span class="w-login-bt"><strong>会员登录</strong></span>
            <form name="form1" method="post" action="user/LoginAction">
                     <table width="90%" border="0" cellspacing="0" cellpadding="0">
                        <tbody>
                            <tr>
                                <td width="60" align="center"></td>
                               <!--  <td>
                                    <input name="radiobutton" class="v-ttop" type="radio" value="1" checked="checked">
                                    普通登录&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <input class="v-ttop" type="radio" name="radiobutton" value="2">
                                    手机动态密码登录
                                </td> -->
                            </tr>
                        </tbody>
                     </table>
                     <table width="90%" id="loginByUser" border="0" cellspacing="0" cellpadding="0">
                        <tbody>
                        	<tr>
                                <td width="60" align="center">账　号</td>
                                <td>
                                    <input name="txtUserCode" type="text" id="txtUserCode" class="input-250">
                                </td>
                            </tr>
                            <tr>
                                <td align="center">密　码</td>
                                <td><input name="txtPassword" type="password" id="txtPassword" class="input-250"></td>
                            </tr>
                            <tr>
                                <td align="center">验证码</td>
                                <td>
                                    <input name="txbValidate" type="text" id="txbValidate" class="input-160">
                                    <!-- 验证码区域 -->
                                    <!-- <input type="hidden"  id="J_down" data-link="http://www.baidu.com"> -->
                                  	<canvas id="myCanvas" onclick="createCode()" class="can" style="width: 70px;height: 35px; vertical-align: middle; border: 1px #CCCCCC solid "></canvas>
                                    <!-- <img id="validateImage" src="#" align="absmiddle" alt="看不清，点我刷新" style="cursor: pointer;" onclick="validateReloado();"> -->
                                    <input type="hidden" name="hid" id="hid">
                                </td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td>
                                	<!-- <a onclick="validate();" id="lbtLogin" class="login_btn" href="#">登 录</a> -->
                                	<input type="submit" onclick="test();" class="login_btn" value="登录">
                                </td>
                            </tr>
                            <!-- <tr style="display:none;">
                                <td>&nbsp;</td>
                                <td>
                                    <input id="chkLoginInfo" type="checkbox" name="chkLoginInfo" class="v-ttop">
                                    保存登录信息两周内免登录
                                </td>
                            </tr> -->
                        </tbody></table>
                        <!--切换部分-->
                        <!-- <table width="100%" id="loginByMobile" style="display: none;" border="0" cellspacing="0" cellpadding="0">
                            <tbody>
                            <tr>
                                <td width="60" align="center">手机号</td>
                                <td>
                                    <input name="txtMobile" type="text" maxlength="20" id="txtMobile" class="input-250">
                                </td>
                            </tr>
                            <tr>
                                <td align="center">校验码</td>
                                <td>
                                    <input name="txtSmsCode" type="text" id="txtSmsCode" class="input-160" style="width:127px;">
                                    <input type="button" id="SendButton" style="top: 2px;" class="button blue" value="获取校验码">
                                 </td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td><a id="LoginByCode" class="login_btn" onclick="validate();" href="#">登 录</a></td>
                            </tr>
                        	</tbody>
                        </table> -->
                        <table width="90%" align="center" border="0" cellspacing="0" cellpadding="0">
                            <tbody>
                            	<tr>
                                	<td width="60">&nbsp;</td>
                                	<td>
                                    	<a href="Ticket/passBack" class="login_a">找回密码</a>
                                    	<a href="Ticket/Register" class="login_a">快速注册</a>
                                    </td>
                            	</tr>
                        	</tbody>
                        </table>
                    </form>
                       
                    </div>
             <div class="h-10"></div>
             <div class="h-10"></div>
             <div class="clear"></div>
         </div>
         
    </div>

<!--页脚-->
<!-- <div class="di">  
  <img src="image/di.png" width="903" height="58">
  </div> -->
  <%@ include file="include/foot.jsp" %>
</body>
</html>